﻿using FreeSql;
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace TomNet.FreeSql.Base
{
    /// <summary>
    /// 仓储模式接口
    /// </summary>
    public interface IRepositoryBase<TEntity, TKey> : IBaseRepository<TEntity, TKey> where TEntity : class
    {
        int SoftDelete(TKey id);
        Task<int> SoftDeleteAsync(TKey id);
    }

    /// <summary>
    /// 以long为主键类型的仓储模式接口
    /// </summary>
    public interface IRepositoryLongBase<TEntity> : IRepositoryBase<TEntity, long> where TEntity : class
    { }

    /// <summary>
    /// 以Guid为主键类型的仓储模式接口
    /// </summary>
    public interface IRepositoryGuidBase<TEntity> : IRepositoryBase<TEntity, Guid> where TEntity : class
    { }

}
